import App from './App'

// #ifndef VUE3
import Vue from 'vue'

import uView from "@/uview-ui";
Vue.use(uView);

import './uni.promisify.adaptor'
Vue.config.productionTip = false

Vue.prototype.$alert = function(text, time) {
	uni.showToast({
		icon: 'none',
		title: text,
		duration: time || 2500
	})
}

Vue.prototype.$showLoading = function(text, time) {
	uni.showLoading({
		mask: true
	})
}

App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif